<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
    <link rel="stylesheet" href="../assets/css/index.css"/>
</head>
<body>
<h1>propsData 用于开发环境，不用于生产</h1>
<hr>
<div id="header"></div>

<script>
    var header = Vue.extend({
        template: '<p>{{message}} {{a}}</p>',
        data: function () {
            return {
                message: 'hello my is header'
            }
        },
        props:['a']
    })
    new header({
        propsData:{
            a:1
        }
    }).$mount('#header');
</script>
</body>
</html>